import request from '@/utils/request'
// 添加角色
export function addUserRole(data) {
  return request({
    url: '/api/permissionManage/role/addRole',
    method: 'post',
    data
  })
}
export function updateRole(data) {
  return request({
    url: '/api/permissionManage/role/updateRole',
    method: 'post',
    data
  })
}
// 删除角色
export function deleteUserRole(params) {
  return request({
    url: '/api/permissionManage/role/deleteRole',
    method: 'post',
    params
  })
}
// 角色列表
export function getUserRoleList(data) {
  return request({
    url: '/api/permissionManage/role/getRoleList',
    method: 'post',
    data
  })
}
export function getUserRoles(params) {
  return request({
    url: '/api/permissionManage/userRole/getUserRoleList',
    method: 'post',
    params
  })
}
export function getPermissionTree() {
  return request({
    url: '/api/permissionManage/permission/getPermissionTree',
    method: 'post'
  })
}
export function addRolePermission(data) {
  return request({
    url: '/api/permissionManage/rolePermission/addRolePermission',
    method: 'post',
    data
  })
}
export function addUserRoleList(data) {
  return request({
    url: '/api/permissionManage/userRole/addUserRole',
    method: 'post',
    data
  })
}
export function getRolePermissionList(params) {
  return request({
    url: '/api/permissionManage/rolePermission/getRolePermissionList',
    method: 'post',
    params
  })
}
